<template>

  <div>
    <a-form-model ref="form" slot="detail">
      <a-row>
        <div class="select-pk">
          <span>姓名：</span>
          <span>{{record.workerName}}</span>
        </div>
        <div class="select-pk">
          <span>性别：</span>
          <span>{{getDictItemValue('sex',record.workerSex)}}</span>
        </div>
        <div class="select-pk">
          <span>工种：</span>
          <span>{{record.workerTypeName != null ? record.workerTypeName : ''}}</span>
        </div>
        <div class="select-pk">
          <span>手机号：</span>
          <span>{{record.workerPhone != null ? record.workerPhone : ''}}</span>
        </div>
        <div class="select-pk">
          <span>身份证号：</span>
          <span>{{record.workerIdCard}}</span>
        </div>
        <div class="select-pk">
          <span>籍贯：</span>
          <span>{{record.workerNativePlace != null || "" ? record.workerNativePlace : "无"}}</span>
        </div>
        <div class="select-pk">
          <span>创建人：</span>
          <span>{{record.createBy}}</span>
        </div>
        <div class="select-pk">
          <span>创建时间：</span>
          <span>{{record.createTime}}</span>
        </div>

      </a-row>
    </a-form-model>
  </div>

</template>

<script>

  import {filterDictTextByCache} from '@comp/dict/JDictSelectUtil'

  export default {
    name: "basicInformation",
    props: {
      record: {}
    },
    components:{

    },
    data() {
      return {
        labelCol: {
          xs: {span: 24},
          sm: {span: 5},
        },
        wrapperCol: {
          xs: {span: 24},
          sm: {span: 16},
        },
        previewImage: '',
        previewVisible: false,
      }
    },
    methods: {
      getDictItemValue(dictCode,text){
        return filterDictTextByCache(dictCode, text);
      },
    },

  }
</script>

<style scoped lang="less">
  @import '~@assets/less/common.less';
  .select-pk{
    display:flex;
    align-items:center;
    margin:10px 0;
    &>span{
      font-weight: bold;
    }
    &-text{
      width: calc(100% - 6em);
      height: 30px;
      text-indent: 1em;
      line-height: 28px;
      border: 1px solid #d9d9d9;
      border-radius: 4px;
    }
  }
</style>